<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="the_div">
        <p>我是p标签</p>
        <h3>我是h3</h3>
        <h3>我是h3</h3>
        <h3>我是h3</h3>
        <a id="theA" href="#">我是一个a标签</a>
        <ul>
            <li>北京</li>
            <li>天津</li>
            <li>南京</li>
        </ul>
        <ol class="my_li">
            <li>大张</li>
            <li>大王</li>
            <li>大狗</li>
        </ol>
        <ul class="my_li">
            <li>小明</li>
            <li>小红</li>
            <li>小蓝</li>
        </ul>
    </div>
    
    <script>
        // const a= document.querySelector('#theA');
        // console.log(a);
        // const h3s = document.querySelectorAll('h3');
        // console.log(h3s);
        // const lis = document.querySelectorAll('ul li,ol li');
        // console.log(lis);
        // const xiaoli= document.querySelectorAll('ul[class=my_li] li');
        // console.log(xiaoli);
        // const xiaohong= document.querySelector('ul[class=my_li] li:nth-child(2)');
        // console.log(xiaohong);
        // xiaohong.innerText='小六'
        // xiaohong.style.color='red'

        const tianjin= document.querySelector('ul li:nth-child(2)');
        console.log(tianjin);
        tianjin.classList.add('tianjin')
        tianjin.style.width='100px'
        tianjin.style.height='100px'
        tianjin.style.backgroundColor='#087'


    </script>
    
</body>
</html>